<template>
  <div class="page">
    <div id="content">
      <h1>1.xxxxx</h1>
      <p>giagnaorgnrogargrganragoarg</p>
      <p>giagnaorgnrogargrganragoarg</p>

      <p>giagnaorgnrogargrganragoarg</p>
      <h2>1.1xxxxxxxx</h2>
      <p>giagnaorgnrogargrganragoarg</p>

      <h3>1.1.1</h3>
      <h3>1.1.2</h3>

      <p>giagnaorgnrogargrganragoarg</p>
      <p>giagnaorgnrogargrganragoarg</p>
      <p>giagnaorgnrogargrganragoarg</p>
      <p>giagnaorgnrogargrganragoarg</p>
      <p>giagnaorgnrogargrganragoarg</p>
      <p>giagnaorgnrogargrganragoarg</p>

      <h1>2.xxxxxxxx</h1>
      <p>giagnaorgnrogargrganragoarg</p>
      <p>giagnaorgnrogargrganragoarg</p>

      <p>giagnaorgnrogargrganragoarg</p>
      <h2>2.1xxxxxxxx</h2>
      <p>giagnaorgnrogargrganragoarg</p>
      <p>giagnaorgnrogargrganragoarg</p>
      <p>giagnaorgnrogargrganragoarg</p>
      <p>giagnaorgnrogargrganragoarg</p>
      <p>giagnaorgnrogargrganragoarg</p>
      <p>giagnaorgnrogargrganragoarg</p>
      <p>giagnaorgnrogargrganragoarg</p>
      <h2>2.2xxxxxxxxx</h2>
      <p>xxxxxxxxxxxxxxx</p>
      <p>xxxxxxxxxxxxxxx</p>

      <p>xxxxxxxxxxxxxxx</p>

      <p>xxxxxxxxxxxxxxx</p>
      <p>xxxxxxxxxxxxxxx</p>
    </div>
    <div class="fix-item">
      <StructureTree :root="content" />
      <div v-html="doc"></div>
    </div>
  </div>
</template>
<script>
import StructureTree from '../components/StructureTree';
export default {
  components: {
    StructureTree,
  },
  data() {
    return {
      content: null,
      doc: '',
    };
  },
  mounted() {
    this.content = document.getElementById('content');
    this.$get('/docs/structure').then((res) => (this.doc = res));
  },
};
</script>
<style lang="scss" scoped>
.fix-item {
  position: fixed;
  right: 50px;
  top: 50px;
  width: 500px;
}

#content {
  height: 500px;
  overflow: scroll;
}
</style>
